package pixelwaks.gui.impl;

import java.awt.*;
import java.awt.image.*;
import javax.swing.border.*;
 
public class BackgroundBorder implements Border {
	
    private final BufferedImage img;
 
    public BackgroundBorder(BufferedImage image) {
    	
        this.img = image;
    }
 
    @Override
    public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {

        g. drawImage(img, 0, 0, null);
    }
 
    @Override
    public Insets getBorderInsets(Component c) {
    	
        return new Insets(0,0,0,0);
    }
 
    @Override
    public boolean isBorderOpaque() {
    	
        return true;
    }
}